Skip to content

fix(service-automation)!: a disabled package's flow it ships alone is neither fired nor served bare, and the served holder of a shared name keeps its slot key (ADR-0150 D3) - #34048

Merged
objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/area-A5b-33893
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/area-A5b-33893

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #33893
Fixes #33905

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no published skill teaches what a trigger or the bare automation entries do for a flow whose package is disabled, or how the engine keys a flow two packages ship (skills/objectstack-automation names a disabled package only for a packaged flow's queue approver)

BREAKING (#33905) for a deployment where a package that alone ships a flow name is disabled while the engine still holds that flow (the re-sync that follows a disable failed or did not run): the flow no longer runs on its trigger, and the engine's bare entries (execute, getFlow, toggleFlow) answer as for a flow they do not hold, so the bare HTTP doors answer 404, the answer the namespaced address already gave. Remedy: enable the package. No key, row or binding moves, so nothing is migrated (ADR-0087: not-required (no-migration-prescription)). #33893 alone is Clause-②: no: it restores a served holder's trigger.

维护者速读

What changes

#33905 (commit 1): a flow whose only holder's package is disabled. PR #33546 withdraws a disabled package's flows on the normal path (the disable's re-sync); this closes the case where the engine still holds the slot. One predicate, isDisabledHolderSlot (PR #33890's, asked of the one resolver with the slot's package as the caller: the registry holds that package's flow of the name AND the package is disabled), now judges the slot of a name one package holds too:

  • triggerRun: the fire-time gate covers a slot of an unshared name. The skip is said once per slot at info, said again after the slot dispatched once more; a re-enable dispatches with no re-arm. This flips PR fix(service-automation)!: a trigger binding does not dispatch a slot whose package is disabled (ADR-0150 D3) #33890's single-holder CONTROL ("as on main today").
  • resolveFlowKey (the run's read, not the durable one) and servedBareFlowKey: a disabled sole holder is absent, so execute (any caller, a subflow / map node's call included), getFlow and toggleFlow answer as for a flow this engine does not hold.

What moves, for such a flow while its package is disabled (FROM → TO):

Entry FROM TO
its trigger binding (record-change, schedule, time-relative, an api hook's queued post) runs the flow nothing runs, no run-history row; said once at info
execute(name, …), any caller, subflow / map calls included runs the flow { success: false, error: "Flow 'NAME' not found" }
getFlow(name) the flow null
bare HTTP doors that probe getFlow (GET /automation/NAME, POST /automation/NAME/trigger, POST /automation/trigger/NAME, POST /automation/NAME/toggle, POST /automation/NAME/clone, GET /automation/NAME/runs) served 404, as the namespaced address /automation/NAMESPACE/NAME… answers
toggleFlow(name, …) switches the flow rejects Flow 'NAME' not found
POST /automation/SOURCE/clone with this flow's name as the new name (taken-name probe getFlow(NEW)) 409 name taken the probe admits the copy. On the engine (measured), a registration with no package lands the copy's body in the disabled package's slot, and once the package is re-enabled, its trigger runs the copy's body until the next re-sync. This is the answer the door already gives once the disable's re-sync has withdrawn the flow, so the door admits nothing the normal path refuses. The seat ruled it no widening (contract record 6900695384), and Clause-②: no (narrowing) stands
a definition write (POST /automation, PUT /automation/NAME) or clone that the engine accepts and that is then refused (unknown notify channel, refused landing or save) puts back the definition the engine held nothing to put back: unregisterFlow(NAME) drops the package's registration
PUT /automation/NAME with a body that leaves out a stored credential (keepStoredFlowCredentials) keeps the credential the engine held carries nothing forward
DELETE /automation/NAME answers a deletion still removes the engine's registration (bareFlowKey, read over every holder); answers 404 unless a stored row was removed

The four write-door rows were read from packages/runtime/src/domains/automation.ts at this head. Each applies only where the door's earlier guards (packagedBaseRefusal, tenantAuthoredWriteRefusal, the clone's first-write pin) admit the request, and the full door is not measured. The engine half of the clone row was measured: probe null, copy filed in the package's slot, its body run on re-enable. These doors ask getFlow a durable question, so they belong on a durable read. That is a runtime change outside this claim, carded as #34145.

Remedy: enable the package. Not moved (condition 2): the slot key, run keys, the trigger binding, flowDispatchHolder, credentials and the version history stay judged over every holder. Parked-run resume is NOT decided here. A package-less flow (the environment's own, or one registered straight into the engine) and an engine with no resolver are CONTROLs.

#33893 (commits 9d712d1d, 7c193056, ea75f64d): the served holder of a name a disabled package co-holds. FlowSlotTable takes a second predicate, coHeldByDisabled(name): the registry holds the name under two or more packages (every holder, R4-G's heldByMany) and at most one of them is served.

  • add: the first package slot of such a name is filed under PACKAGE/NAME, not the bare name (the boot pull with one holder disabled).

  • remove: a co-holder's removal moves no key while the predicate holds (the disable's re-sync withdrawing the disabled holder's slot), so the served slot keeps its key and its binding.

  • The co-holder's return (the enable's re-sync registers every contender, in precedence's order):

    • activateFlowTrigger: a lone slot filed under its qualified key takes the M1 decline only once another package's body of the name is recorded as refused (flowRefusals). So when the served holder registers first, it is armed, with no "whose body was refused" warning; a co-holder the re-sync has not reached yet is no refusal.
    • placeFlowSlot: when the co-holder's slot is added beside an incumbent already under its qualified key, no key moves, so the incumbent's re-arm (the one a move would have done) is done there.
    • recordFlowRefusal: a refusal recorded after such a slot was armed still declines it, and now says the warning.
  • settle, the fold back: once the registry no longer holds the name twice (the disabled holder uninstalled), the lone slot kept under PACKAGE/NAME folds back to the bare name through moveFlowRecords, the record move a withdrawal uses. It is asked (settleFlowName) the first time the engine:

    • places the slot again (placeFlowSlot);
    • fires it (triggerRun, and that event runs where the slot lands);
    • reads the name (resolveFlowKey, bareFlowKey, servedBareFlowKey, inboundHookSlot).

    So a failed re-sync leaves no unreachable flow. isShared is main's again (slot count, or the registry holding the name twice), so a name one package holds is never read as shared. Removal, version history, rollback, withdraw, the bare inbound hook and the credential source serve it.

  • loneSharedFlowKey (the M1 decline, its warning, recordFlowRefusal, getFlowRegistration): M1 now needs two SERVED holders, so the decline and the "whose body was refused" warning stay for a body another served package really had refused, and a disabled co-holder is no M1.

A holder that leaves the registry (uninstall) before its slot is withdrawn folds the name back to its bare key at the withdrawal, as before (CONTROL).

Tests

packages/services/service-automation/src/flow-slots-per-package.test.ts (the shared harness file, per the AGENTS.md rule that a new pin for a component with a shared harness goes into that file as a top-level describe), over the real SchemaRegistry, the real flowNameResolver and a recording trigger:

  • [#33748] describe: its single-holder CONTROL is flipped to [#33905] a name one package holds, disabled at runtime with its slot left armed: not dispatched, said once; re-enabled, it dispatches with no re-arm.
  • [#33905] the bare entries of a flow whose only holder's package is disabled (4): execute / getFlow / toggleFlow equal the answers for a name the engine does not hold, durable reads unmoved, re-enable serves again; a subflow call reaches no flow; CONTROLs: a package-less flow, no resolver.
  • [#33893] the served holder of a name a disabled package co-holds keeps its qualified key, armed (23):
    • the FlowSlotTable unit, settle included;
    • in both registry orders and for each holder disabled, a boot disable (registry holds both, one disabled before the pull) and a runtime disable followed by the re-sync's withdrawFlowSlot;
    • for the runtime disable → withdraw order and for the boot-disable order, the disabled holder then uninstalled and the uninstall's re-sync re-registering the served holder: key t, trigger armed under t and dispatching, inboundHookSlot('t') undefined (served, not refused), getFlowVersionHistory('t') the slot's two versions, execute, and unregisterFlow('t') removing it;
    • the co-holder's return, for the boot disable and the runtime disable, each holder disabled, with the re-sync registering the served holder first and the returning one first (8): both slots armed and dispatched, no refused-body warning;
    • CONTROL: the returning holder's body really is refused. The served one is declined behind the warning, said once; when the returning holder is registered after all, both are armed;
    • the stretch between the uninstall and any re-registration (a failed re-sync), first touched by the trigger (the event runs the flow, then the slot is under t with its binding) and first touched by a bare entry (inboundHookSlot, getFlow, version history, execute serve it);
    • CONTROL: an uninstall before the withdraw folds the key back.

packages/runtime/src/domains/automation-addressed-route.test.ts, new describe [#33905] … the bare door answers as its namespaced address (404) over a real SchemaRegistry and the real dispatcher: for a disabled sole holder each bare door (GET, trigger, legacy trigger, toggle, runs) answers 404 with the code its address answers, nothing runs or switches; the clone door with the flow as its source answers 404 as its address does, and nothing is registered; CONTROL: enabled, both serve. The service double answers what the engine now answers (the engine half is pinned above). No runtime source changed, so this pin is not ablated; its moving half is ablated as A3 below.

Acceptance notes

  • The boot pull's first holder of a name two SERVED packages ship is declined behind the refused-body warning until the second registers (finding, not changed). Measured on the engine with this PR's sources (a local commit before the merge), both packages enabled and the registry holding both before the pull: the refused-body warning was said once (refusedBodyWarnings=1) and the first slot was re-armed only by the second holder's key move. No body was refused. It predates this PR (unchanged here: M1 still reads every served holder, and telling "refused" from "not yet registered" needs the refusal record, which the ObjectQL-registry pull does not write). Raised in the report for its own card.
  • execute is gated for every caller, as the shared-name rule already is (servedCaller, amendment 4), so a subflow / map call of such a flow now gets no flow; listed in the FROM → TO table.
  • Doors that read getFlow for a durable question (the clone door's name-taken probe, the definition writes' rollback copy and carried-forward credentials, the DELETE door's existence probe, the flow-start admission's definition read) see null for such a flow. The rows above name what moves. Moving them onto a durable read is a runtime change outside this claim, carded as runtime: the automation write doors (clone probe, put-back copy, carried credentials, DELETE probe) ask getFlow a durable question and move with a disabled sole holder #34145 (the boot pull's bare-key first-holder decline is service-automation: the boot flow pull declines the first of two served holders of one flow name behind a false 'whose body was refused' warning #34051).
  • Engine readers that are not entries (the subflow guards' call key, the activation-row key, packagedFlowOwner) do not fold the slot themselves. Between an uninstall and the first fold they read the bare name, and the first registration, fire or bare read folds it.
  • getFlowRuntimeStates / listFlows still report a disabled sole holder's flow as bound and listed while its trigger is gated (review#2 N2, outside condition 1; unchanged).
  • Deviation from the order's suggested route: the pins are top-level describes in the shared harness files rather than new per-card files (AGENTS.md, ruling record 6583487846).

Verification

All readings are at head d6a464ce, under the shared verify lock (VERDICT command-exit 0). The commits on this head:

origin/main has moved on since then. The only change to a file here is #34090 in engine.ts, which touches the start-condition gate in a different region. git merge-tree --write-tree HEAD origin/main is clean.

Tests (final head)
  • @objectstack/service-automation test: 282 files / 4024 tests passed. typecheck: exit 0.
  • src/flow-slots-per-package.test.ts: 91/91 passed, 27 of them new.
  • @objectstack/runtime, narrowed to the automation domain: 48 files / 1035 tests passed. typecheck: exit 0.
  • Direct dependents of the engine, all passed:
    • plugin-trigger-record-change: 12 files / 122 tests
    • plugin-trigger-schedule: 13 files / 256 tests
    • plugin-trigger-api: 3 files / 73 tests
    • plugin-approvals: 120 files / 1652 tests
  • Dogfood battery (pnpm --filter @objectstack/dogfood test, the CI command, no shard, no path): 467 files passed, 3 skipped (470). 3959 tests passed, 42 skipped (4001). No failures.
Ablations (each landed and restored by ablation-replace, `git diff HEAD` empty after each)
# Mutation Reading
A1 trigger gate back to shared names only 1 of 79 red
A2 resolveFlowKey disabled-sole-holder gate off 2 red
A3 servedBareFlowKey gate off 1 red
A4 FlowSlotTable.add qualified keying off 5 red
A5 FlowSlotTable.remove keep-key off 6 red
A6 M1 served-holder narrowing off 4 red
A8 the fold in placeFlowSlot off 2 of 80 red: both disable-then-uninstall pins
A9 re-arm of a qualified incumbent on the co-holder's add off 1 of 91 red: the refused-then-registered CONTROL
A10 the qualified lone slot's decline no longer waits for a recorded refusal 5 of 91 red: the four served-first re-enable pins and the CONTROL
A11 recordFlowRefusal's re-ask (the decline and its warning) off 1 of 91 red: the CONTROL
A12 the fold in triggerRun off 1 of 91 red: first touched by its trigger
A13 the fold in inboundHookSlot off 1 of 91 red: first touched by a bare entry
  • A1 to A6 were run at 75b2f32c, and A8 at b4d4a4a8. The code they mutate is unchanged since.
  • A7 (the qualified-lone isShared clause) is retired, because the clause is gone.
  • A first A10 run planted a syntax error (escaped &&) and measured nothing. It was re-run with valid text; the reading above is from that second run.

Pre-fix reproduction: this head's test file was run against the b4d4a4a8 sources. 7 tests were red: the four served-first re-enable pins, the CONTROL and both pins for the stretch before re-registration. The sources were restored and the blob was checked equal to HEAD.

The runtime door pin is not ablated, because no runtime source changes. Its moving half is A3.

Measured, not pinned (scratch tests, removed)

Clone onto a disabled sole holder, engine half:

  • getFlow('t') is null.
  • A package-less registerFlow('t', copy) lands in the package's slot.
  • Once the package is re-enabled, its trigger runs the copy's body.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands derived 72 families at d6a464ce, and all 72 exited 0. pnpm check:type-check-debt and pnpm check:dual-build-cjs-loads ran under the lock after a full build: 0 raw tsc errors; 123 require entry points across 72 packages. Reconciliation with --ran: 72 derived, 72 run, 0 NOT-MEASURED, 0 UNRUN.
  • The ADR-0087 registration exited 0. It reads 33748-trigger-disabled-holder.md, already on main from PR fix(service-automation)!: a trigger binding does not dispatch a slot whose package is disabled (ADR-0150 D3) #33890, and this PR's 33905-disabled-sole-holder-flow.md, which is not-required (no-migration-prescription).
  • Changeset no-major, empty-changeset and Part-of closing-keyword checks all exited 0.
  • check-closing-keyword-parity --body exited 2, which is informational. The body declares Fixes for both cards, which is intended.
  • eslint over the touched files exited 0. The repo-wide pnpm lint is left to CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3

…hose package is disabled

A slot of a flow name two packages hold is judged when its trigger fires:
while its package is disabled the run is skipped (said once at info), never
substituted, and it dispatches again on re-enable with no re-arm. Slot keys,
bindings and the dispatch holder do not move (ADR-0150 D3, seat ruling
6884403301 amendments 3 and 7).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…as a narrowing

The changeset carries Clause-② no (narrowing), the BREAKING banner, the
ADR-0087 not-required marker, and says an event fired while the package is
disabled is dropped, not replayed. The single-holder CONTROL reads "as on
main today".

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…s alone is not dispatched by its trigger, and the bare entries answer as for no flow

A flow name one package holds, that package disabled while the engine still
holds its slot (a disable whose re-sync failed or did not run): its trigger
binding is not dispatched (said once at info), and execute, getFlow and
toggleFlow answer as for a flow the engine does not hold, which is what the
namespaced address answers. A re-enable dispatches it again with no re-arm.
The durable reads (slot key, dispatch holder, version history) do not move.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…package also ships keeps its slot key and its trigger

A disable is reversible and moves no key. While the registry holds a flow
name under two packages and the others are disabled, the served package's
lone slot is filed, and stays, under PACKAGE/NAME: the boot pull files it so
beside a disabled holder, and the re-sync's withdrawal of the disabled
holder's slot no longer re-keys it to the bare name or stops its binding.
The M1 decline and its refused-body warning are kept for a body another
served package really had refused.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
# Conflicts:
#	packages/services/service-automation/src/engine.ts
#	packages/services/service-automation/src/flow-slots-per-package.test.ts
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-automation, touching 15 documentable anchor(s).

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/kernel/cluster.mdx (via AutomationEngine (symbol, a top-level class))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-6.mdx (via AutomationEngine (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 5 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 86350e125d5773af80fee702766ef19447294557 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from ca7a649d71aadcad73bc60d31e1ca434c5276c85 — the merge of head d6a464ce03f8f9a767155addc2ac5ce9bbd74aac into base 86350e125d5773af80fee702766ef19447294557, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ca7a649d71aadcad73bc60d31e1ca434c5276c85 && git checkout ca7a649d71aadcad73bc60d31e1ca434c5276c85
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 86350e125d5773af80fee702766ef19447294557 d6a464ce03f8f9a767155addc2ac5ce9bbd74aac && git checkout -B drift-repro 86350e125d5773af80fee702766ef19447294557 && git merge --no-ff d6a464ce03f8f9a767155addc2ac5ce9bbd74aac

node scripts/docs-audit/affected-docs.mjs --json 86350e125d5773af80fee702766ef19447294557

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 86350e125d5773af80fee702766ef19447294557 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Request: review · PR #34048 · area S6 · Fixes #33893 #33905 · head 75b2f32c18aafda5f7882b5762cf21bf8534f14a (declared final; 51 check-runs green or expected skip) · 2026-11-15T17:45Z


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review claim · head 75b2f32 · 2026-11-15T17:46Z (review-c, S6; ACCEPT read + CONTRACT_REVIEW_TIER record, narrowing face)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 75b2f32c18aafda5f7882b5762cf21bf8534f14a
Local-runs: none
Scope: packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/flow-slots.ts, packages/services/service-automation/src/flow-slots-per-package.test.ts, packages/runtime/src/domains/automation-addressed-route.test.ts + read, not reviewed: packages/runtime/src/domains/automation.ts, packages/runtime/src/domains/automation-address.ts, packages/runtime/src/flow-dispatch-status.ts, packages/runtime/src/flow-start-admission.ts, packages/services/service-automation/src/plugin.ts (resyncFlowsFromProtocol), packages/triggers/trigger-api/src/plugin.ts, packages/plugins/plugin-approvals/src/approval-service.ts, scripts/pm/clause2-line.mjs, content/docs/releases/v18/18-5.mdx, content/docs/api/metadata-api.mdx, skills/objectstack-automation

PR #34048, cards #33893 and #33905, net diff against main (merge-base 03b4d2d1), 6 files, +432/-28. Check-runs on the head: 35 success, 16 skipped (opt-in or UI lanes), none failed or pending; Check Changeset, PR-body guards, Governed Surface Queue Guard, Dogfood Regression Gate, Test Core 1-8 and the type-check lanes are all green. The verdict below rests on the tree, read at the head, not on those.

① Derived judgments

#33905 (commit 998cb968), a flow whose one holder's package is disabled while the engine still holds its slot:

  • triggerRun asks isDisabledHolderSlot for every slot that has a package, before the unshared short-cut to execute. Right. It is the ruling's fire-time gate, asked at fire time, so a re-enable dispatches with no re-arm; a package-less slot never reaches the question (condition 3).
  • resolveFlowKey (the run's read only, durable excluded) and servedBareFlowKey answer absent / undefined through isDisabledSoleHolder. Right. execute, getFlow and toggleFlow are the three entries condition 1 names, and bareFlowKey (version history, removal, rollback), flowDispatchHolder, the slot table and the run keys are untouched (condition 2).
  • The predicate needs both readings of the one resolver (own holding resolved, and not-found on the served-caller read), so a slot whose package the registry does not hold, and an engine with no resolver, stay served. Right (condition 3, both pinned as CONTROLs).
  • The bare doors that probe getFlow first answer 404. Right, and it is the namespaced address's answer on main: automation-address.ts returns 404 … not found in namespace when no served holder holds the name.
  • execute is gated for every caller, subflow and map calls included. Right: it is the answer the same call gets once the disable's re-sync has withdrawn the flow, and the answer the shared-name rule already gives (servedCaller).
  • Clause-②: no (narrowing) where the card's condition 5 and the claim wrote yes. Right as the dev wrote it for the declared rows: clause2-line.mjs reads yes (narrowing) as a diff that also widens, and none of the declared rows widens. S1 below is the one place the tree does widen an accept set, undeclared.

#33893 (commit 9d712d1d), the served holder beside a disabled co-holder:

  • FlowSlotTable.add files the first package slot under PACKAGE/NAME while coHeldByDisabled; remove moves no key while it holds. Right for the two observed paths of the card (boot pull beside a disabled holder; the disable's re-sync withdrawing the disabled holder's slot), and it is amendment 7's "moves no key".
  • loneSharedFlowKey now needs the SERVED read to refuse, so the engine's [M1] rule (decline, warning, recordFlowRefusal, getFlowRegistration) stays for two served holders and a disabled co-holder is no [M1] case. Right. Two served holders at the boot pull still take main's path (bare key, decline, re-key by the second), unchanged.
  • isShared reads a lone slot filed under its qualified key as shared. Wrong as built: see F1. It serves the two entries the new pin asks (execute, getFlow) and turns every other bare reader of the name into a refusal.
  • A served holder whose slot was filed bare before the registry held the disabled co-holder keeps the bare key and is now armed (the [M1] narrowing covers it). Right, and the later enable still moves that key as on main; the changeset's "no re-arm of the served one" holds for the two orders the pins measure.

Public surface: no export, schema key, route or config key is added, removed or re-shaped. FlowSlotTable's constructor takes a second optional parameter (engine-local class).

② Semver level

Both changesets are patch on @objectstack/service-automation; the diff moves no metadata key, so Metadata-protocol: none and patch are the level AGENTS.md step 3 gives a non-protocol change, breaking or not.

  • .changeset/33905-disabled-sole-holder-flow.md: title carries !, body carries line-initial Clause-②: no (narrowing) and Metadata-protocol: none, a **BREAKING** banner, the moved answers as before/now pairs, the remedy "enable the package", and exactly one ADR-0087 marker (not-required (no-migration-prescription)), which is true: no stored row, key or binding moves.
  • .changeset/33893-served-holder-keeps-slot-key.md: Clause-②: no, Metadata-protocol: none, no banner, no marker. Correct for a fix, and not yet true of this head: F1 is a set of served answers this commit takes away.
  • PR body: Clause-②: no (narrowing), Metadata-protocol: none, a Skills-docs: none — … line, the BREAKING banner and the FROM → TO table; the title carries !. The Skills-docs: reason is true: skills/objectstack-automation names a disabled package only for a packaged flow's queue approver, and no page under content/docs outside the release-owned pages states what a trigger or a bare automation entry does for a disabled package's flow.

Clause-②: no (narrowing) — matches the declared rows of #33905. It does not cover F1 (an undeclared narrowing inside the Clause-②: no commit) or S1 (an undeclared 409 → accepted at the clone door).

③ Boundary flags

Dev report 6898330736, open_questions: none. Deviations, each answered:

  1. Pins as top-level describes in the shared harness files, not per-card files: accepted (AGENTS.md shared-harness rule).
  2. The changeset says "ran … It now answers …" in place of FROM → TO labels, because the ADR-0087 gate reads the label as a migration prescription; the PR body keeps the table: accepted, condition 5's rows are present on both carriers.
  3. execute gated for every caller: accepted, judged right in ①.
  4. Repo-wide pnpm lint left to CI: accepted, Lint · ESLint and the other lint check-runs are green on this head.
  5. No second merge of origin/main: accepted; none of the six paths moved on main since the merge-base.
  6. Branch merged origin/main after PR fix(service-automation)!: a trigger binding does not dispatch a slot whose package is disabled (ADR-0150 D3) #33890 landed, PR opened on main: accepted; the net diff is the two card commits.

Out-of-scope finding (the boot pull's first of two SERVED holders declined behind the refused-body warning until the second registers): confirmed as predating this PR and unchanged by it (coHeldByDisabled is false while the served read refuses); the seat's request 6898645381 names its follow-up, #34051.

"Parked-run resume is NOT decided here" is stated on the PR body and the changeset, as condition 2 orders. Condition 6's order (PR #33890 first, CONTROL flipped here) holds: the [#33748] single-holder CONTROL is the flipped pin.

The PR is still a draft.

④ Design judgment

The narrowing itself (#33905) is the published rule made real, not a capability taken away. main already publishes "A disabled package holds no name" for the flow doors (18.5 notes; automation-address.ts; ADR-0150 D3), the disable's re-sync already withdraws a disabled package's flows (sole holders included), and the namespaced address already answers 404. What this PR removes is the window in which a failed or skipped re-sync left such a flow firing and served bare. The gate is exact on the three entries and the trigger: it asks the one resolver, it gates only a slot whose package the registry holds and has disabled, and nothing durable is re-keyed. I could not make it gate a package-less flow, a flow of an enabled package, or a slot the registry does not hold, and I could not make a disabled sole holder's flow run through execute, a subflow call or its trigger.

F1 (must-fix) — #33893 leaves the served holder stuck under its qualified key after the disabled co-holder is uninstalled, and every bare entry that reads isShared without the resolver then refuses a name ONE package holds, until a restart. Sequence, all on the normal path: packages A and B both ship flow t; disable B; the disable's re-sync calls withdrawFlowSlot(B, 't') (remove moves no key, A stays A/t); uninstall B; the uninstall's re-sync re-registers A's flow, and placeFlowSlot returns A's own key, so nothing folds it back. From then on flowSlots.isShared('t') is true by the new clause alone ([...packages.values()][0] !== name) while the registry holds t once. Read in the head's engine.ts:

  • bareFlowKey('t') throws PackageScopedNameRefusedError, whose candidates (sharedFlowNameRefusal, read over the slots because the durable read no longer refuses) name A alone: unregisterFlow('t') (so DELETE /automation/t), getFlowVersionHistory('t'), rollbackFlow('t') and withdrawFlow('t') answer an "ambiguous" 409 that names one package.
  • inboundHookSlot('t') with no address answers refused, so the bare inbound hook of t (trigger-api handleInboundHook) is not served; external posts to the bare hook URL get the door's one refusal.
  • the credential source's at('t') throws the same refusal, and packagedFlowOwner('t') answers none.
    On main the same sequence folds A's slot to t at the withdraw, and after the uninstall heldByMany is false, the re-sync re-arms it, and every one of those entries serves the bare name. The new pin "the disabled holder then uninstalled" asserts flowSlotKey(P1, 't') is P1/t and asks only execute, getFlow and the trigger, so it fixes the stuck key in place and does not see the refused entries. The CONTROL beside it (uninstall before the withdraw folds back) shows the answer now depends on whether the package was disabled before it was uninstalled. This is a narrowing of served answers inside the commit declared Clause-②: no, not named in either changeset. Either fold a lone qualified slot back to its bare key (through moveFlowRecords, as an uninstall does today) once the registry no longer holds the name under two packages, or stop reading such a slot as shared at the entries above; then pin getFlowVersionHistory, unregisterFlow and the bare inboundHookSlot for the disable → withdraw → uninstall order.

S1 (should-fix) — #33905 moves three runtime door answers the FROM → TO rows do not carry, because those doors ask getFlow a durable question ("is this name taken", "what do I restore") and now get the served answer for a slot the engine still holds. Read in packages/runtime/src/domains/automation.ts at the head (no runtime source changes; the PR body says these were "not measured beyond the table"):

  • the clone door's name-taken probe getFlow(targetName): FROM 409 name taken TO the copy is admitted, and registerFlow lands its package-less body in the disabled package's slot, so the package's flow runs the copy's body on re-enable until the next re-sync. This is an accept-set widening under a no declaration, and the shadow the same-name refusal exists to prevent.
  • registerAndSaveFlow's held (the rollback copy): null, so a refused save or landing calls unregisterFlow(name) and drops the package's registration where main restored it; keepStoredFlowCredentials carries nothing forward.
  • DELETE /automation/NAME: flowIsUnknown is true, the engine's registration is still removed (unregisterFlow reads bareFlowKey, over every holder), and the door answers 404 unless a stored row was reset, where main answered a deletion.
    Each equals what the door answers once the re-sync has withdrawn the flow, which is why this is not a must-fix; but condition 2 keeps durable reads over every holder and condition 5 orders the rows. The claim bars runtime/src/domains/automation.ts, so: add the three rows to the changeset and the PR body, change Clause-② only if the seat rules the clone row a widening that the line must carry, and file the collision-probe and rollback-copy reads as a follow-up card.

N1 (nit) — the door list on both carriers names POST /automation/NAME/clone, and the runtime pin's DOORS table has five rows without it; the clone source-404 row is declared and unpinned. Prose or follow-up.

N2 (nit) — the runtime describe passes on main as well (its service double is hand-set to the new answers); the PR body says so and names A3 as the moving half. Accepted as stated.

Delta owed: F1's fix and S1's rows, on the new head.

Implemented-by: claude/area-A5b-33893
Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review — FAIL

Head-sha: 75b2f32c18aafda5f7882b5762cf21bf8534f14a
Reviewer: review-c · read 2026-11-15T17:56Z · claim 6898656368
Implemented-by: claude/area-A5b-33893 · Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x
Contract-review record at this head: 6898771491 (CONTRACT_REVIEW_TIER, narrowing face, from an isolated sub-agent, adopted). VERDICT FAIL: F1 must-fix, S1 should-fix.

What holds:

Owed (a delta review of both):

  1. F1 (must-fix): service-automation: when one of two packages holding a flow name is disabled, the served package's trigger is never armed (boot) or is re-keyed and stopped (runtime withdraw) #33893 strands the served holder on its qualified key after the disabled co-holder is uninstalled.
    • Sequence: A and B both ship t, B is disabled, then B is uninstalled.
    • When B is disabled, its slot is withdrawn and remove returns no move (coHeldByDisabled). When B is uninstalled, the re-sync re-registers A, and placeFlowSlot returns A's own key A/t (engine.ts L5077–5078). Nothing folds it back.
    • isShared('t') is now true by the new clause alone (key !== name) while the registry holds t once. So bareFlowKey refuses: unregisterFlow (DELETE /automation/t), getFlowVersionHistory, rollbackFlow and withdrawFlow answer a 409 that names one package. The bare inbound hook and the credential at('t') refuse too, until a restart.
    • On main the same sequence folds back to t. This is a served-answer narrowing inside the commit declared Clause-②: no.
    • Fix: fold a lone qualified slot back through moveFlowRecords once the registry no longer holds the name twice, or stop reading such a slot as shared at those entries. Pin getFlowVersionHistory, unregisterFlow and the bare inboundHookSlot for the disable → withdraw → uninstall order.
  2. S1 (should-fix): three runtime door answers move without FROM → TO rows. The doors ask getFlow a durable question.
    • The clone door's name-taken probe goes from 409 to admitted, and the copy lands in the disabled package's slot. That is an undeclared accept-set widening.
    • registerAndSaveFlow's rollback copy becomes null, so a refused save drops the registration.
    • DELETE /automation/NAME answers 404 while it still unregisters.
    • Add the rows to the changeset and the body. If the clone row is a widening the Clause-② line must carry, that is the seat's to rule. File the probe and rollback-copy reads as a follow-up card (runtime automation.ts is outside the claim).
  3. Nits: N1, the clone door is declared but has no row in the runtime DOORS pin. N2, the runtime describe also passes on main; accepted as stated.

Out of scope and confirmed as older than this PR: the boot pull declines the first of two served holders, which is #34051.

Next: a delta review of F1's fix and S1's rows, on a new green head the area declares final.

… once the disabled co-holder is uninstalled

A lone slot kept under PACKAGE/NAME beside a disabled co-holder now settles
back to the bare name at its next placement once the registry no longer
holds the name twice (the uninstall's re-sync re-registers it), through the
same record move a withdrawal uses. isShared reads the registry and the slot
count again, as on main: a name one package holds is never read as shared,
so removal, version history, rollback, withdraw, the bare inbound hook and
the credential source serve it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
… holder's flow moves

The clone door's taken-name probe, the definition writes' rollback copy and
carried-forward credentials, and the DELETE door's answer all ask getFlow,
so they move with it; the changeset now says how. The runtime door pin gains
the clone door's source row.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head b4d4a4a · 2026-11-15T20:05Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b4d4a4a87fed1b4b7c7360f24fd1f61214eb63a2
Local-runs: none
Scope: packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/flow-slots.ts, packages/services/service-automation/src/flow-slots-per-package.test.ts, packages/runtime/src/domains/automation-addressed-route.test.ts + read, not reviewed: .changeset/33905-disabled-sole-holder-flow.md, .changeset/33893-served-holder-keeps-slot-key.md, packages/services/service-automation/src/plugin.ts (resyncFlowsFromProtocol, resolveFlowContenders), packages/services/service-automation/src/flow-precedence.ts, packages/runtime/src/domains/automation.ts, packages/runtime/src/domains/mcp.ts, packages/runtime/src/action-execution.ts, packages/runtime/src/endpoint-executor.ts, packages/runtime/src/flow-slot-view.ts, packages/triggers/trigger-api/src/plugin.ts, scripts/pm/clause2-line.mjs, AGENTS.md (Post-Task Checklist step 3)

Read at 2026-11-15T20:17Z. First review of this head by this seat, taken on patrol as owed; claim: comment 6900507492; prior record 6898771491 (FAIL) is on an earlier head. Independence: implemented in a zhuangjianguo lane (domain:server#5); neither dispatched nor implemented by os-tesla.

PR #34048, cards #33893 and #33905, net diff against merge-base 03b4d2d1: 6 files, +500/-26. This head adds two commits on the head the prior record judged (7c193056 the fold, b4d4a4a8 the changeset rows and the clone pin). Everything below is read off the diff and the cited code at the head; nothing was built or run.

Prior record 6898771491, each finding by id:

  • F1 (must-fix): closed as written, with a residue. The sequence it named (disable, the re-sync's withdraw, uninstall) now ends on the bare key: FlowSlotTable.settle folds the lone qualified slot when placeFlowSlot places it again, through moveFlowRecords, and isShared is main's again (the qualified-lone clause is gone). Both orders (runtime disable, boot disable) are pinned for the key, the armed binding, inboundHookSlot, getFlowVersionHistory, execute and unregisterFlow. The residue is S1 below (the stretch before the fold). The state F1 was about, a lone slot under its qualified key, has a second consequence the prior record did not reach: M1 below.
  • S1 (should-fix): changed, half open. The three write-door answers are now on the changeset as before/now rows. They are not on the PR body (M2). The Clause-② question it left for the seat is ruled in ② here. The follow-up card it asked for is not on either thread (S2).
  • N1 (nit): closed. The clone door's source row has its pin.
  • N2 (nit): open, unchanged, accepted as stated; continued as N1 here, and it now covers the new clone pin too.

① Derived judgments

#33905, every door through which such a flow (one holder, that package disabled, slot still held) fires or is served, read at the head:

  • Record-change, schedule, time-relative and the api hook's queued post: every binding's callback is triggerRun (one construction site), and the gate now sits before the unshared short-cut. Right: nothing runs, no run row, said once per slot at info, and it is asked at fire time, so a re-enable dispatches with no re-arm. The binding and any scheduled job stay in place and their ticks are dropped, not replayed; the changeset says so.
  • The inbound hook door itself: inboundHookSlot answers undefined for an unshared name, so the door accepts the post as before and the queued post is dropped at the gate. Right for an anonymous door with one answer for every outcome, and it is the row the changeset declares.
  • Manual and action launch, the REST trigger doors, the declared endpoint executor, a subflow or map call, and the MCP action tools: each reaches the engine through execute, and the MCP listing asks getFlow. resolveFlowKey (the run's read) answers absent. Right, for every caller.
  • GET /automation/NAME, toggle, clone-as-source, runs list: getFlow / toggleFlow through servedBareFlowKey. Right; 404 is the namespaced address's answer.
  • Durable reads (bareFlowKey, flowDispatchHolder, credentials, version history, run keys, getFlowSlot, the approvals reads): unmoved. Right (condition 2).
  • A run in flight when the package is disabled keeps running; a subflow call it makes afterwards finds no flow. This follows from "any caller" and is declared. Resuming a parked run is stated as not decided, on both carriers.
  • CONTROLs: a package-less flow, a flow of an enabled package, and an engine with no resolver stay served, by the predicate's two readings. Right, and pinned.
  • Not gated, and outside the card's condition 1: listFlows and getFlowRuntimeStates (N2).

#33893:

  • add files the first slot qualified while coHeldByDisabled; remove moves no key while it holds; loneSharedFlowKey needs the served read to refuse. Right for the two observed paths of the card while the co-holder stays disabled.
  • "Enabling the other package again arms its slot beside it, with no re-arm of the served one" (changeset). Wrong through the real re-sync, in one registration order: M1.
  • The fold after an uninstall. Right once the served holder is placed again; see S1 for the stretch before that.

Public surface: no export, schema key, route or config key is added, removed or re-shaped. FlowSlotTable gains an optional constructor parameter and settle (engine-local).

② Semver level

CI on this head: 51 check-runs, 35 success, 16 skipped (opt-in or UI lanes), none failed, none pending. Check Changeset, PR-body guards, Governed Surface Queue Guard, Dogfood Regression Gate, Test Core 1-8 and the type-check lanes are green. The verdict rests on the tree, not on these.

  • Both changesets are patch on @objectstack/service-automation with Metadata-protocol: none. Right: no metadata key moves, and AGENTS.md step 3 gives a non-protocol breaking change patch with its banner and disposition.
  • .changeset/33905-…: ! in the title, line-initial Clause-②: no (narrowing) and Metadata-protocol: none, the **BREAKING** banner, before/now pairs for the trigger, execute, getFlow and its doors, toggleFlow, and now the three write doors, the remedy "enable the package", and exactly one ADR-0087 marker, not-required (no-migration-prescription). The marker is true: no stored row, key or binding moves.
  • .changeset/33893-…: Clause-②: no, no banner. Not true of this head while M1 stands: it takes away an armed trigger main ends with after a re-enable.
  • PR body: the two declaration lines, the banner, the Skills-docs: line and the ! title are there. The FROM → TO table and the text under "What changes" are those of the earlier head: M2.
  • The clone row, which the dev left for the seat ("This may widen what the door accepts"). Ruled here: not a widening the line must carry; Clause-②: no (narrowing) stands. The door's taken-name refusal for such a name moves to the answer the door already gives on the normal path, once the disable's re-sync has withdrawn the flow; no request is admitted that the published path refuses. The changeset should say that, not "may widen" (S2).

Clause-②: no (narrowing) — matches the declared rows of #33905. It does not cover M1.

③ Boundary flags

④ Design judgment

The narrowing (#33905) makes the published rule real and takes no declared capability away: main already says a disabled package holds no name, the disable's re-sync already withdraws such a flow, and the namespaced address already answers 404. I could not find a door through which a disabled sole holder's flow runs, and could not make the gate reach a package-less flow, an enabled package's flow or a slot the registry does not hold. The fire-time placement makes re-enable need nothing. That half would pass.

#33893 does not yet hold against its own card ("a disable is reversible").

M1 (must-fix) — new at this seat; same key state as prior F1. After a disable and re-enable of the co-holder, the holder that was served throughout can be left with no trigger, behind the false refused-body warning, until some later re-sync.

  • Read at the head: A and B ship t; B is disabled; A's lone slot is A/t (boot disable, or runtime disable and withdraw). B is enabled, and the enable's resyncFlowsFromProtocol registers every contender, A included (registerFlow re-binds: deactivateFlowTrigger, then activateFlowTrigger).
  • When A is registered before B: A's slot is still the name's one slot and both holders are served, so loneSharedFlowKey('t') answers A/t and activateFlowTrigger declines it with "whose body was refused". B then arrives; FlowSlotTable.add moves no key, because A's is already qualified, so moveFlowRecords gets nothing and nothing arms A again. The order comes from resolveFlowPrecedence and is not the PR's to choose.
  • On main the same step ends with both armed: A sits under the bare key, B's arrival moves it, and the move re-arms it. That key move is the only thing that lifts the M1 decline of a first holder (the dev's own out-of-scope note says so), and this PR removes the move for exactly this slot.
  • So the changeset's sentence about enabling is false in that order, the card's second expectation (the warning names a refused body only when one was refused) fails again, and the Clause-②: no commit carries an undeclared loss.
  • The pins miss it because they model the enable's re-sync as registering the returning holder only (pull(off, …)); the served holder is never registered again before it.
  • Owed: arm (or never decline) a lone slot filed under its qualified key when its co-holder returns, and pin the enable as the re-sync does it: served holder registered first, then the returning one, and the reverse, for both the boot and the runtime disable, asserting both bindings and no refused-body warning.

M2 (must-fix) — continues prior S1 (its PR-body half). The PR body is the other carrier of this narrowing and describes the earlier head.

  • Its FROM → TO table has no row for the three write doors the changeset now declares (the clone taken-name answer, the put-back after a refused write and the carried-forward credential, DELETE).
  • It states "isShared: a lone slot filed under its qualified key reads as shared", and lists ablation A7 for it. The head removed that clause; the fold (settle, placeFlowSlot) is not mentioned.
  • Its verification is at 75b2f32c (79 tests); the head is b4d4a4a8.
  • Owed: the seat posts the revised body (the dev says it is prepared), with the rows and wording the changeset carries, after M1's fix, so the body, the changeset and the tree say one thing.

S1 (should-fix) — continues prior F1 (residue). Between the co-holder leaving the registry and the served holder's next placement, the served holder is unreachable, and it stays so if that re-sync's read fails.

S2 (should-fix) — continues prior S1 (its remainder).

  • The 33905 changeset ships "This may widen what the door accepts" under a no declaration. Replace it with the ruling in ②: the answer is the one the door gives once the re-sync has withdrawn the flow.
  • File the follow-up card for the runtime doors that ask getFlow a durable question (taken-name probe, put-back copy, carried-forward credentials, the DELETE existence probe) and name it on the PR.

N1 (nit) — continues prior N2. The runtime describe, the new clone pin included, passes on main: its service double is hand-set to the new answers. The body says so and names A3 as the moving half. Accepted as stated.

N2 (nit) — new. getFlowRuntimeStates (the _status door) still reports such a flow bound: true with no reason while its trigger is gated, and listFlows still names it. Outside condition 1; a reason on the row would say what the info line says.

Delta owed: M1's fix with its pins, M2's body, on a new head; S1 and S2 with it.

Implemented-by: claude/area-A5b-33893
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Area S6 · fix round 2 dispatched for record 6900695384 (M1, M2, S1, S2). S2 follow-up filed: #34145 (runtime write doors ask getFlow a durable question). The revised PR body is posted by the area after the new head is green. · 2026-11-15T21:56Z


Generated by Claude Code

…ning co-holder and reached before the uninstall's re-sync

A lone slot filed under its qualified key beside a disabled co-holder is
declined only once another package's body of the name is recorded as
refused, so the enable's re-sync registering the served holder first arms
it with no refused-body warning. A co-holder that returns while the
incumbent is already qualified moves no key, so the incumbent's re-arm is
done where the move's would have been. A refusal recorded later still
declines it and says so.

The fold back to the bare name after the co-holder leaves the registry now
also happens the first time the engine fires the slot or reads its name
(the bare key resolvers and the inbound hook), not only at its next
placement, so a failed re-sync leaves no unreachable flow.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…d co-holder, and the clone answer as ruled

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Request: review (delta) · PR #34048 · area S6 · Fixes #33893, #33905 · head d6a464ce03f8f9a767155addc2ac5ce9bbd74aac (declared final; 55 check-runs green or expected skip) · delta over b4d4a4a8 · 2026-11-15T23:42Z


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review claim · head d6a464c · 2026-11-15T23:43Z (review-c, S6; delta ACCEPT read + CONTRACT_REVIEW_TIER delta record against 6900695384)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d6a464ce03f8f9a767155addc2ac5ce9bbd74aac
Local-runs: none
Scope: packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/flow-slots.ts, packages/services/service-automation/src/flow-slots-per-package.test.ts, packages/runtime/src/domains/automation-addressed-route.test.ts + read, not reviewed: .changeset/33905-disabled-sole-holder-flow.md, .changeset/33893-served-holder-keeps-slot-key.md, packages/services/service-automation/src/plugin.ts (resyncFlowsFromProtocol, the cold-boot bind, the mutation sync, packagedFlowReader), packages/services/service-automation/src/flow-definitions.ts (recordFlowRefusal, toggleFlow), packages/services/service-automation/src/flow-activation-projection.ts, packages/services/service-automation/src/subflow-guards.ts, packages/runtime/src/flow-slot-view.ts, packages/runtime/src/domains/automation.ts (the address admission), packages/triggers/trigger-record-change/src/record-change-trigger.ts, packages/triggers/trigger-schedule/src/schedule-trigger.ts, packages/triggers/trigger-api/src/plugin.ts, packages/objectql/src/engine-hooks-and-functions.ts (triggerHooks, unregisterHooksByPackage)

DELTA record. Base: contract record 6900695384 (review#2, FAIL) at b4d4a4a87fed1b4b7c7360f24fd1f61214eb63a2. Read at 2026-11-15T23:50Z. Reviewed in full: git diff b4d4a4a8 d6a464ce (two commits, ea75f64d the engine fix and d6a464ce the changeset wording; 5 files, +127/-13), the PR body as it stands on this head, cards #33893 and #33905 with every comment, dev report 6902991885, follow-up cards #34051 and #34145, and the check-runs on this head. The PR's net surface against merge-base 03b4d2d1 is the same six files (+616/-28), nothing new. Nothing was built or run.

Base record 6900695384, each graded finding by id:

  • M1: closed
  • M2: closed
  • S1: closed
  • S2: closed
  • Its N1 (the runtime describe passes on main) and N2 (getFlowRuntimeStates / listFlows): unchanged, both stated in the PR body, carried below as N1 and N2.

① Derived judgments

M1, the served holder after its co-holder returns. Read at the head, with A and B shipping t, B disabled, A's lone slot under A/t:

  • activateFlowTrigger declines a lone slot of a name two served packages hold only when the slot holds the bare key (as on main) or, for a slot under its qualified key, once flowRefusals holds the name. Right: under a qualified key the trigger fires its own slot by key (triggerRun → executeKey), so the reason main gives for the decline (the bare key reading as the name's one holder) does not apply until a body really was refused.
  • Enable, re-sync registers A first: placeFlowSlot finds A's own slot, settle moves nothing (the registry holds the name twice), registerFlow re-binds, and the gate arms it with no warning. B then arrives: FlowSlotTable.add moves no key, and the new block in placeFlowSlot asks the gate for the incumbent again (a no-op here, it is bound). Both armed. Right.
  • Enable, re-sync registers B first: B is added beside A/t, the incumbent re-arm is a no-op, A's own registration re-binds with two slots held. Both armed. Right.
  • Boot disable then enable: the same two orders from the add-filed qualified key. Right, and pinned (8 rows: boot and runtime, each holder, both orders, asserting both bindings, both dispatches and no refused-body warning).
  • B's body really refused on its return: every runtime refusal path in plugin.ts (the re-sync, the cold-boot bind, the mutation sync) calls recordFlowRefusal; it stops A's binding and now asks the gate again, which declines and says the warning once. B registered later: placeFlowSlot clears the said-mark and arms A. Right, and pinned as the CONTROL. This is main's M1 end state.
  • Enable with no re-sync yet: A stays bound under A/t and its trigger runs its own slot; the bare name is refused naming both served holders, as on main. Right: that is the card's "a disable is reversible and moves no key".
  • Disable again after a recorded refusal: the re-sync's registration of A finds the served read resolved, deletes the record and arms A. Right.
  • Two served holders at boot, bare-key first holder: the flowName === slotName arm keeps main's decline and its warning until the second registers. Unchanged, and carded as service-automation: the boot flow pull declines the first of two served holders of one flow name behind a false 'whose body was refused' warning #34051. Right that it is not changed here.
  • The mutation sync skips a holder whose body the engine already holds, so there only B is registered; A was armed throughout. Right.

S1, the stretch between the co-holder leaving the registry and the served holder's next placement:

  • settleFlowName (FlowSlotTable.settle plus moveFlowRecords) is asked in placeFlowSlot, triggerRun, resolveFlowKey, bareFlowKey, servedBareFlowKey and inboundHookSlot. settle now reads the registry only for a lone slot whose key is not the bare name, so a one-holder deployment pays one map read per call. Right.
  • First touched by the trigger: the fold releases the binding under A/t and arms t; this event's key is read again through flowKeyNow and runs through execute('t'). In the record-change trigger the in-progress dispatch iterates the hook array it started with (unregisterHooksByPackage replaces the array, registerHook pushes onto the new one), so the new binding does not fire a second time for the same event. Right.
  • First touched by a bare entry: execute, getFlow, toggleFlow, removal, history, rollback, withdrawFlow and the bare inbound hook all pass one of the five readers before they read isShared. Right.
  • The HTTP doors in that stretch: the address admission (automation.ts) and flowServiceForCaller hand out a slot view only while the registry holds the name under two packages; otherwise an addressed path is its bare path. So no door reaches executeSlot / toggleFlowSlot / getFlowSlot with a qualified key of an unshared name; every door goes through a bare entry, which folds first. Right.
  • The named deviation (internal isShared readers do not fold): the activation projection reads slot.name for an unshared slot and asks the holder by name, right; the credential source answers by slot.name, right; the run store keys a packaged run by keyOf, right; the subflow guards' call key reads the bare name, which holds no flow until the fold, so a guard asked in that stretch (a caller registered before any fold) may read the child as absent; not traced further, and it ends at the first fold. No served door answer is wrong by this. Two in-run readings are off in the stretch; see N3.

Public surface: none added, removed or re-shaped by the delta. settleFlowName is private; FlowSlotTable.settle keeps its signature.

② Semver level

CI on this head: 55 check-runs, 37 success, 18 skipped, none failed, none pending. Check Changeset, PR-body guards, Governed Surface Queue Guard, Dogfood Regression Gate, Test Core 1/8 to 8/8, Lint · PM dispatch-gates and the type-check lanes are green. The verdict rests on the tree.

  • Both changesets stay patch on @objectstack/service-automation, Metadata-protocol: none. Right.
  • .changeset/33905-…: ! in the title, line-initial Clause-②: no (narrowing) and Metadata-protocol: none, the **BREAKING** banner, the before/now rows, the remedy "enable the package", and exactly one ADR-0087 marker, not-required (no-migration-prescription). The clone row now states the base record's ruling in place of "may widen". Right.
  • .changeset/33893-…: Clause-②: no, no banner, no marker. Now true of the tree: the armed trigger M1 said it took away after a re-enable is kept in both orders, and I found no accept-set it narrows or widens. Its enable and uninstall sentences match the code (one imprecision, N4).
  • PR body on this head: Fixes #33893, Fixes #33905, Clause-②: no (narrowing), Metadata-protocol: none, a Skills-docs: none line with its reason (true: skills/objectstack-automation names a disabled package once, for a queue approver), the **BREAKING** banner with the one ADR-0087 disposition, and the ! title. The FROM → TO table carries the four write-door rows the changeset carries. The isShared bullet and ablation A7 are gone; settle, the three co-holder-return bullets and A9 to A13 are in. The test counts hold by reading: 23 cases in the [#33893] describe and 4 in [#33905]. Every row I checked is true of the tree.

Clause-②: no (narrowing) — matches. The narrowing declared is #33905's and is exactly the behaviour taken away; #33893 is a fix and hides no further narrowing.

③ Boundary flags

④ Design judgment

No must-fix, no should-fix.

The narrowing (#33905) is unchanged by the delta and stands as the base record read it: it makes the published rule real (a disabled package holds no name; the disable's re-sync already withdraws such a flow; the namespaced address already answers 404) and takes no declared capability away.

#33893 now holds against its card. I tried disable → re-enable in both registration orders from both the boot and the runtime disable, a refused returning body before and after the served holder's registration, enable with no re-sync, disable → uninstall with and without a re-sync, a registry that briefly holds the name once, and the fold fired from inside a trigger dispatch. In each the served holder ends armed, or declined only behind a recorded refusal, and no bare or addressed door answers for the wrong flow. The qualified-key arm of the M1 gate is not a widening: it arms a slot that fires only itself, and main's end state returns the moment a refusal is recorded.

Nits (none changes a served answer or a stored row):

N1 (nit) — carried from the base record's N1. The runtime describe passes on main because its service double is hand-set; the body says so and names A3 as the moving half. Accepted as stated.

N2 (nit) — carried from the base record's N2. getFlowRuntimeStates and listFlows still report a disabled sole holder's flow as bound and listed. Stated in the body; outside condition 1.

N3 (nit) — new. A lone slot under PACKAGE/NAME of a name the registry holds once is a state main never has, and two readers still assume key equals name there, until the first fold:

  • triggerRun: the fold-on-fire run takes the unshared branch with the trigger's own context, so a schedule tick (which seeds params.flowName with the armed key) hands that one run PACKAGE/NAME as flowName; the shared branch rewrites it to the name, this branch does not.
  • packagedFlowOwner(key): for such a slot it asks the loader's set by the key, which names no flow, so armedFlowPackage and flowCallerPackage answer no package for a run in flight or resumed under that key before the fold, and its bare references resolve as a caller with no package. The body's note says these readers "read the bare name"; this one reads the key.
  • An event already past its trigger's own await when another event folds the slot is dropped at debug by the moved-key rule.
    Graded a nit against the base record's own scale: it graded the whole flow being unreachable in this stretch a should-fix, and this is one run's parameter or caller in the same stretch (a co-holder uninstalled with no re-sync), where main and the previous head ran nothing. A follow-up card, or an accepted deviation; not a change on this head.

N4 (nit) — new, prose faces only.

No delta owed.

Implemented-by: claude/area-A5b-33893
Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review — PASS

Head-sha: d6a464ce03f8f9a767155addc2ac5ce9bbd74aac
Reviewer: review-c · read 2026-11-15T23:51Z · delta on b4d4a4a8 (review#2 record 6900695384, FAIL) · my earlier verdict 6898785695 at 75b2f32c
Implemented-by: claude/area-A5b-33893 · Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x
Contract-review record at this head: 6903460187 (CONTRACT_REVIEW_TIER delta against 6900695384, from an isolated sub-agent, adopted). VERDICT PASS, no must-fix, no should-fix.

Closed:

Declarations: !, Clause-②: no (narrowing) (#33905's, and exactly the behaviour taken away), Metadata-protocol: none, a true Skills-docs: none, the BREAKING banner and one ADR-0087 marker. #33893's changeset is Clause-②: no and hides no further narrowing.

Checks: all 55 check-runs passed or were skipped, none red; mergeable_state: clean.

Accepted nits:

Not governed: the area lands this PR per landing-operations.md.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

席位核对

ACCEPT · area S6 lands PR #34048 at head d6a464ce03f8f9a767155addc2ac5ce9bbd74aac · 2026-11-15T23:53Z

reading result
check-governed-merges.mjs --pr 34048 (full output read) NOT governed, 0 of 6 paths; +616 / -28 ≤ 3000
check-runs on this head 55: 0 failure, 0 pending

Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant